#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
@file_name: processes_and_threads_in_a_python_app.py
@date: 2025-07-21 13:24
@author: Falling Snow
@desc: 一个简单的 Python 应用程序中的进程和线程
"""

import os
import threading

print(f"python进程当前的进程id为: {os.getpid()}")

total_threads = threading.active_count()

thread_name = threading.current_thread().name

print(f"python当前运行了多少线程: {total_threads}")
print(f"当前运行的线程是: {thread_name}")
